package org.example.pglog.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.example.pglog.aop.FieleName;

/**
 * @author: 船长
 * @create: 2024-09-01 18:18
 **/
@Data
@TableName("t_user")
public class User {

    // 雪花id
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @FieleName("姓名")
    @TableField(value = "name")
    private String name;

    @TableField(value = "age")
    @FieleName("年龄")
    private int age;


    @TableField(value = "hobby")
    @FieleName("爱好")
    private String hobby;

    public User(){

    }

    public User(String id, String name, int age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }
}
